import request from '@/utils/request'

// 查询企业的部门列表
export function getdepartment() {
  return request({
    method: 'get',
    url: '/company/department/'
  })
}

// 新增部门
export function adddepartment(data) {
  return request({
    method: 'post',
    url: '/company/department/',
    data
  })
}

// 编辑部门
export function getdepartmentById(id) {
  return request({
    method: 'get',
    url: '/company/department/' + id
  })
}

// 编辑部门
export function updatedepartmentById(data) {
  return request({
    method: 'put',
    url: '/company/department/' + data.id,
    data
  })
}

// 删除部门部门
export function deldepartmentById(id) {
  return request({
    method: 'delete',
    url: '/company/department/' + id
  })
}
